<?php 
$sql =	"SELECT
			  c.page_id,
			  d.title,
			  d.description,
			  d.meta_key,
			  d.meta_description	
		  FROM
			  pages AS c,
			  page_description AS d,
			  sef_url AS s
		  WHERE
		  
			  c.page_id = d.page_id
			  AND
			  d.lang_id = '".$_SESSION['lang_id']."'
			  
			  AND
				c.page_id = s.query
				AND
				s.lang_id = '".$_SESSION['lang_id']."'
				AND s.tamplate = 'page'
			 
			  AND
				s.sef_url = 'csr' 
		  ";
$result = query($sql);

$row = mysql_fetch_object($result);


head(sth($row->title),sth($row->meta_description),sth($row->meta_key));

?>

<section id="content" class="cf">
        
       
        <div  class="gr2 left">
            <div class="tab">
                <h1><?=stripslashes($row->title)?></h1>	 
                <?=stripslashes($row->description)?>
            </div>
        </div>
                


       <?php 

            $sql = "SELECT
            c.cover,

            d.title,
            s.sef_url


        FROM
            projects AS c,
            project_description AS d,
            project_to_category AS p2c,
            sef_url AS s
        WHERE
            p2c.project_id =  c.project_id
            AND 
            p2c.category_id = '20'
            AND 
            s.query = c.project_id

            AND

            c.project_id = d.project_id

            AND
            s.tamplate='project'

            AND

            d.lang_id = '".$_SESSION['lang_id']."'

            AND

            s.lang_id = '".$_SESSION['lang_id']."'

            AND c.published


            ORDER BY  c.order_number DESC

          ";
        $result = query($sql);

        while ($row = mysql_fetch_object($result)) {


		?>
        
        <div class="gr1 left">
            <a href="<?=HTML_BASE.$_SESSION['lang']?>/<?=$row->sef_url?>" class="<?=$row->class?>">
                <img class="hover-item" data-caption="<?=$row->title?>" src="<?=HTML_BASE?>project_images/covers/<?=$row->cover?>" alt="<?=$row->title?>" title="<?=$row->title?>"/>
            </a>
        </div>
        
        <?php }?>

    </section>



<?php

foot();

?>